Repository navigation
[Bugfix][KV Offload] Revert "Return pending work, events and stats from on_schedule_end (#68962)" - #70063
Open
orozery wants to merge 2 commits into
Open
[Bugfix][KV Offload] Revert "Return pending work, events and stats from on_schedule_end (#68962)"#70063orozery wants to merge 2 commits into
orozery wants to merge 2 commits into
Conversation
…hedule_end (vllm-project#68962)" This reverts commit 27053d0. vllm-project#68962 moved the step-end report into on_schedule_end(), which runs before the forward pass. Completions only reach the manager in update_connector_output(), so events and stats produced by a finished transfer are now reported one step later, and an idle engine takes one extra step to flush them. Reverting restores same-step reporting: get_stats() and take_events() are read after update_connector_output() and therefore see the step's completions. Item 4 of vllm-project#68678 is intended to re-land as a single batched complete_transfers() call that returns the post-completion StepResult. Co-Authored-By: Claude Code <noreply@anthropic.com> Signed-off-by: Or Ozeri <oro@il.ibm.com>
orozery
marked this pull request as ready for review
November 26, 2026 07:39
orozery
requested review from
ApostaC,
NickLucche,
ivanium,
wzhao18 and
xuechendi
as code owners
November 26, 2026 07:39
Contributor
Author
|
/ci run |
|
✅ Triggered Buildkite CI #105918 for commit ℹ️ This PR is 1 commit behind upstream |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Reverts #68962 (item 4 of #68678). Restores same-step reporting of connector KV events and stats: the connector reads the manager's
get_stats()andtake_events()afterupdate_connector_output()has applied the step's completions, instead of reading a snapshot taken inon_schedule_end()before the forward pass.Claims
on_schedule_end() -> None, plushas_pending_work(),take_events()andget_stats().Validation
git revert 27053d0137005f5d5e55077314fa40d22b16d7fbapplied cleanly onorigin/mainat353d5febf7379b0459020c4341a9ffac58997650(auto-merge ontests/v1/kv_connector/unit/offloading_connector/test_scheduler.py, no conflicts).StepResult,_ManagerStepStateor_step_statereferences anywhere invllm/ortests/(grep).ast.parseclean on all 10 changed Python files;ruff checkandruff format --checkpass.Tests on an OpenShift cluster (1 GPU unless noted), torch 2.14.0+cu132,
cuda_available True, at headd33e9b783219ec96df153bfd6383b78a7fc48961. The head has no CI image of its own (draft), so this is the ancestor image353d5febf7379b0459020c4341a9ffac58997650plus a Python overlay of the 4 changedvllm/files and 6tests/files; every changed module loaded from the overlay (PYOV ok).All 6 failures are
test_dcp_partial_tail_*, and each fails while buildingParallelConfig:Value error, World size (2) is larger than the number of available GPUs (1) in this node. The comparison run shows the same sixParallelConfigerrors on unmodified code. Rerun of exactly those tests with 2 GPUs:Comparison (
old-code): base image plus the reverted test files, to show the tests detect the interface change:Top error:
AttributeError: Mock object has no attribute 'get_stats'— the pre-#68962 tests driveget_stats(),take_events()andhas_pending_work(), which the un-reverted code no longer calls.Details
Why revert rather than wait for the follow-up. #68962 moved the step-end report into
on_schedule_end(), which runs before the forward pass (vllm/v1/core/sched/scheduler.py:1482). Completions only reach the manager inupdate_connector_output()(:3893), and stats and events are read after it (:2766,:2799). So the snapshot is taken before the data it reports exists: events and stats from a finished transfer are reported one step later, and an idle engine needs one more step to flush them. The_stalemarker added in #68962 bounds the delay but does not remove it.Tradeoff. This gives back the batching #68962 introduced: up to four manager calls (and ~4 lock entries) per step instead of one, as reported in #68962's table. It is a short-term revert; item 4 is expected to re-land as the single batched
complete_transfers(completions) -> StepResultcall discussed on #68678, which reports the post-completion state in the same step and drains events and stats in the sameupdate_from_output().Coordination. #70021, #70047 and the #70048 draft are stacked on the
StepResultinterface this revert removes; they will need rebasing or reworking if this lands. The KVCR finish-time context issue raised on #68678 is independent of this revert and stays with those PRs.Why this is not duplicating an existing PR. No open PR reverts #68962 (
gh pr list --state open --search 68962,--search 'revert on_schedule_end'); the only hit is #60000, which merely references the commit.AI assistance was used. The change was produced by Claude Code at the submitter's direction; the submitter reviewed the reverted diff and owns it.
Pull Request Checklist
I used vLLM's
/pr-checklistskill.AI assistance was used during the creation of this PR.
Design Fit: Exact revert of a single squash commit; no new abstractions. Restoring the previous interface is simpler than the state machine [KV Offload] Return pending work, events and stats from on_schedule_end #68962 added (
_ManagerStepState, stale flag).Testing and Validation: Cluster run at head: 1813 passed, 6 failed only on the 2-GPU
ParallelConfiglimit, and those 6 pass with 2 GPUs; the reverted tests fail on un-reverted code, as expected.Code Quality and Style: Reverts to the previously reviewed code;
ruffpasses and no unrelated changes are included.Pull Request Contents: Summary, evidence and tradeoff documented above; links to [KV Offload] Return pending work, events and stats from on_schedule_end #68962 and [RFC]: [KV Offload] Batched, serializable connector-manager interface #68678.
🤖 Generated with Claude Code